use SMS
drop procedure SMS_InsertUpdateCategory
go
create procedure SMS_InsertUpdateCategory
	@isUpdate bit,
	@categoryId int ,
	@categoryName nvarchar(100)
as
	if(@isUpdate = 1)
		begin
			update Categories
			set categoryName= @categoryName
			where categoryId= @categoryId		
		end
	else
		begin
			insert into Categories(categoryName)
			values (@categoryName)
		end



